package com.ruoyi.project.module.accessories.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.accessories.mapper.AccessoriesMapper;
import com.ruoyi.project.module.accessories.domain.Accessoriess;
import com.ruoyi.common.support.Convert;

/**
 * 宠物饰品 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-16
 */
@Service
public class AccessoriesServiceImpl implements IAccessoriesService 
{
	@Autowired
	private AccessoriesMapper accessoriesMapper;

	/**
     * 查询宠物饰品信息
     * 
     * @param id 宠物饰品ID
     * @return 宠物饰品信息
     */
    @Override
	public Accessoriess selectAccessoriesById(Integer id)
	{
	    return accessoriesMapper.selectAccessoriesById(id);
	}
	
	/**
     * 查询宠物饰品列表
     * 
     * @param accessories 宠物饰品信息
     * @return 宠物饰品集合
     */
	@Override
	public List<Accessoriess> selectAccessoriesList(Accessoriess accessories)
	{
	    return accessoriesMapper.selectAccessoriesList(accessories);
	}
	
    /**
     * 新增宠物饰品
     * 
     * @param accessories 宠物饰品信息
     * @return 结果
     */
	@Override
	public int insertAccessories(Accessoriess accessories)
	{
	    return accessoriesMapper.insertAccessories(accessories);
	}
	
	/**
     * 修改宠物饰品
     * 
     * @param accessories 宠物饰品信息
     * @return 结果
     */
	@Override
	public int updateAccessories(Accessoriess accessories)
	{
	    return accessoriesMapper.updateAccessories(accessories);
	}

	/**
     * 删除宠物饰品对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteAccessoriesByIds(String ids)
	{
		return accessoriesMapper.deleteAccessoriesByIds(Convert.toStrArray(ids));
	}
	
}
